home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14382 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 65 6e 67 | 2e 63 6f 6e 76 65 78 2e |news.eng|.convex.|
|00000030| 63 6f 6d 21 61 72 63 6f | 21 75 73 65 6e 65 74 0a |com!arco|!usenet.|
|00000040| 46 72 6f 6d 3a 20 42 72 | 69 61 6e 20 4c 65 61 63 |From: Br|ian Leac|
|00000050| 68 20 3c 6c 61 73 62 66 | 6c 40 61 61 69 2e 61 72 |h <lasbf|l@aai.ar|
|00000060| 63 6f 2e 63 6f 6d 3e 0a | 53 75 62 6a 65 63 74 3a |co.com>.|Subject:|
|00000070| 20 52 65 3a 20 57 68 79 | 20 64 6f 65 73 20 74 68 | Re: Why| does th|
|00000080| 69 73 20 77 6f 72 6b 3f | 0a 58 2d 4e 6e 74 70 2d |is work?|.X-Nntp-|
|00000090| 50 6f 73 74 69 6e 67 2d | 48 6f 73 74 3a 20 31 33 |Posting-|Host: 13|
|000000a0| 36 2e 32 32 36 2e 31 31 | 36 2e 31 0a 43 6f 6e 74 |6.226.11|6.1.Cont|
|000000b0| 65 6e 74 2d 54 79 70 65 | 3a 20 74 65 78 74 2f 70 |ent-Type|: text/p|
|000000c0| 6c 61 69 6e 3b 20 63 68 | 61 72 73 65 74 3d 75 73 |lain; ch|arset=us|
|000000d0| 2d 61 73 63 69 69 0a 54 | 6f 3a 20 22 4a 6f 68 6e |-ascii.T|o: "John|
|000000e0| 20 4d 2e 20 47 72 65 65 | 72 22 20 3c 67 72 65 65 | M. Gree|r" <gree|
|000000f0| 72 6a 6f 40 6d 61 69 6c | 2e 61 75 62 75 72 6e 2e |rjo@mail|.auburn.|
|00000100| 65 64 75 3e 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |edu>.Mes|sage-ID:|
|00000110| 20 3c 33 31 35 43 39 32 | 38 38 2e 34 35 42 39 40 | <315C92|88.45B9@|
|00000120| 61 61 69 2e 61 72 63 6f | 2e 63 6f 6d 3e 0a 53 65 |aai.arco|.com>.Se|
|00000130| 6e 64 65 72 3a 20 75 73 | 65 6e 65 74 40 6e 65 77 |nder: us|enet@new|
|00000140| 73 2e 61 72 63 6f 2e 63 | 6f 6d 0a 43 6f 6e 74 65 |s.arco.c|om.Conte|
|00000150| 6e 74 2d 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |nt-Trans|fer-Enco|
|00000160| 64 69 6e 67 3a 20 37 62 | 69 74 0a 4f 72 67 61 6e |ding: 7b|it.Organ|
|00000170| 69 7a 61 74 69 6f 6e 3a | 20 41 52 43 4f 20 41 6c |ization:| ARCO Al|
|00000180| 61 73 6b 61 20 49 6e 63 | 2e 0a 52 65 66 65 72 65 |aska Inc|..Refere|
|00000190| 6e 63 65 73 3a 20 3c 44 | 6f 78 76 6e 41 2e 4c 30 |nces: <D|oxvnA.L0|
|000001a0| 43 40 6d 61 69 6c 2e 61 | 75 62 75 72 6e 2e 65 64 |C@mail.a|uburn.ed|
|000001b0| 75 3e 0a 4d 69 6d 65 2d | 56 65 72 73 69 6f 6e 3a |u>.Mime-|Version:|
|000001c0| 20 31 2e 30 0a 44 61 74 | 65 3a 20 53 61 74 2c 20 | 1.0.Dat|e: Sat, |
|000001d0| 33 30 20 4d 61 72 20 31 | 39 39 36 20 30 31 3a 34 |30 Mar 1|996 01:4|
|000001e0| 36 3a 34 39 20 47 4d 54 | 0a 58 2d 4d 61 69 6c 65 |6:49 GMT|.X-Maile|
|000001f0| 72 3a 20 4d 6f 7a 69 6c | 6c 61 20 32 2e 30 20 28 |r: Mozil|la 2.0 (|
|00000200| 58 31 31 3b 20 49 3b 20 | 48 50 2d 55 58 20 41 2e |X11; I; |HP-UX A.|
|00000210| 30 39 2e 30 35 20 39 30 | 30 30 2f 37 35 35 29 0a |09.05 90|00/755).|
|00000220| 0a 4a 6f 68 6e 20 4d 2e | 20 47 72 65 65 72 20 77 |.John M.| Greer w|
|00000230| 72 6f 74 65 3a 0a 3e 20 | 0a 3e 20 54 68 69 73 20 |rote:.> |.> This |
|00000240| 69 73 20 70 72 6f 62 61 | 62 6c 79 20 61 20 68 6f |is proba|bly a ho|
|00000250| 72 72 69 62 6c 79 20 73 | 69 6d 70 6c 65 20 71 75 |rribly s|imple qu|
|00000260| 65 73 74 69 6f 6e 2c 20 | 62 75 74 20 49 20 77 61 |estion, |but I wa|
|00000270| 73 20 67 6f 69 6e 67 20 | 74 68 72 6f 75 67 68 20 |s going |through |
|00000280| 61 0a 3e 20 66 65 77 20 | 62 6f 6f 6b 73 2c 20 62 |a.> few |books, b|
|00000290| 72 75 73 68 69 6e 67 20 | 75 70 20 6f 6e 20 6d 79 |rushing |up on my|
|000002a0| 20 69 6f 73 74 72 65 61 | 6d 73 2c 20 77 68 65 6e | iostrea|ms, when|
|000002b0| 20 49 20 73 61 77 20 74 | 68 69 73 20 74 69 64 62 | I saw t|his tidb|
|000002c0| 69 74 20 69 6e 20 4a 61 | 6d 73 61 27 73 0a 3e 20 |it in Ja|msa's.> |
|000002d0| 4d 75 6c 74 69 6d 65 64 | 69 61 20 54 72 69 6c 6f |Multimed|ia Trilo|
|000002e0| 67 79 20 28 54 68 65 20 | 43 44 2d 52 4f 4d 20 62 |gy (The |CD-ROM b|
|000002f0| 79 20 4b 72 69 73 20 4a | 61 6d 73 61 29 0a 3e 20 |y Kris J|amsa).> |
|00000300| 0a 3e 20 23 69 6e 63 6c | 75 64 65 20 3c 69 6f 73 |.> #incl|ude <ios|
|00000310| 74 72 65 61 6d 2e 68 3e | 0a 3e 20 23 69 6e 63 6c |tream.h>|.> #incl|
|00000320| 75 64 65 20 3c 63 74 79 | 70 65 2e 68 3e 0a 3e 20 |ude <cty|pe.h>.> |
|00000330| 0a 3e 20 76 6f 69 64 20 | 6d 61 69 6e 28 76 6f 69 |.> void |main(voi|
|00000340| 64 29 0a 3e 20 20 7b 0a | 3e 20 20 20 20 63 68 61 |d).> {.|> cha|
|00000350| 72 20 6c 65 74 74 65 72 | 3b 0a 3e 20 0a 3e 20 20 |r letter|;.> .> |
|00000360| 20 20 77 68 69 6c 65 20 | 28 21 20 63 69 6e 2e 65 | while |(! cin.e|
|00000370| 6f 66 28 29 29 0a 3e 20 | 20 20 20 20 20 7b 0a 3e |of()).> | {.>|
|00000380| 20 20 20 20 20 20 20 20 | 6c 65 74 74 65 72 20 3d | |letter =|
|00000390| 20 63 69 6e 2e 67 65 74 | 28 29 3b 0a 3e 20 20 20 | cin.get|();.> |
|000003a0| 20 20 20 20 20 6c 65 74 | 74 65 72 20 3d 20 74 6f | let|ter = to|
|000003b0| 75 70 70 65 72 28 6c 65 | 74 74 65 72 29 3b 0a 3e |upper(le|tter);.>|
|000003c0| 20 20 20 20 20 20 20 20 | 63 6f 75 74 20 3c 3c 20 | |cout << |
|000003d0| 6c 65 74 74 65 72 3b 0a | 3e 20 20 20 20 20 20 7d |letter;.|> }|
|000003e0| 0a 3e 20 20 7d 0a 3e 20 | 0a 3e 20 57 68 79 20 64 |.> }.> |.> Why d|
|000003f0| 6f 65 73 20 74 68 69 73 | 20 77 6f 72 6b 21 3f 21 |oes this| work!?!|
|00000400| 3f 20 20 49 74 20 73 65 | 65 6d 73 20 74 6f 20 72 |? It se|ems to r|
|00000410| 65 73 65 72 76 65 20 73 | 74 6f 72 61 67 65 20 66 |eserve s|torage f|
|00000420| 6f 72 20 6f 6e 6c 79 20 | 6f 6e 65 0a 3e 20 63 68 |or only |one.> ch|
|00000430| 61 72 61 63 74 65 72 20 | 69 6e 20 6c 65 74 74 65 |aracter |in lette|
|00000440| 72 2c 20 62 75 74 20 6f | 75 74 70 75 74 73 20 61 |r, but o|utputs a|
|00000450| 20 77 68 6f 6c 65 20 6c | 69 6e 65 20 61 74 20 61 | whole l|ine at a|
|00000460| 20 74 69 6d 65 2e 20 20 | 46 65 65 6c 20 66 72 65 | time. |Feel fre|
|00000470| 65 20 74 6f 0a 3e 20 66 | 6c 61 6d 65 20 6d 79 20 |e to.> f|lame my |
|00000480| 73 74 75 70 69 64 69 74 | 79 2c 20 62 75 74 20 70 |stupidit|y, but p|
|00000490| 6c 65 61 73 65 20 73 61 | 74 69 73 66 79 20 6d 79 |lease sa|tisfy my|
|000004a0| 20 63 75 72 69 6f 73 69 | 74 79 20 28 49 27 6d 20 | curiosi|ty (I'm |
|000004b0| 72 65 61 6c 6c 79 20 6e | 6f 74 20 74 68 69 73 0a |really n|ot this.|
|000004c0| 3e 20 63 6c 75 65 6c 65 | 73 73 2c 20 49 20 70 72 |> cluele|ss, I pr|
|000004d0| 6f 6d 69 73 65 21 21 29 | 0a 3e 20 0a 3e 20 4a 6f |omise!!)|.> .> Jo|
|000004e0| 68 6e 20 47 72 65 65 72 | 0a 0a 4a 6f 68 6e 2c 0a |hn Greer|..John,.|
|000004f0| 0a 4e 6f 20 6e 65 65 64 | 20 66 6f 72 20 66 6c 61 |.No need| for fla|
|00000500| 6d 65 73 2e 2e 2e 0a 0a | 54 68 65 20 4f 53 20 64 |mes.....|The OS d|
|00000510| 6f 65 73 20 6e 6f 74 20 | 70 61 73 73 20 79 6f 75 |oes not |pass you|
|00000520| 72 20 69 6e 70 75 74 20 | 6c 69 6e 65 20 74 6f 20 |r input |line to |
|00000530| 79 6f 75 72 20 70 72 6f | 67 72 61 6d 20 75 6e 74 |your pro|gram unt|
|00000540| 69 6c 20 79 6f 75 20 70 | 72 65 73 73 0a 74 68 65 |il you p|ress.the|
|00000550| 20 63 61 72 72 69 61 67 | 65 20 72 65 74 75 72 6e | carriag|e return|
|00000560| 2e 20 54 68 65 20 69 6e | 70 75 74 20 6c 69 6e 65 |. The in|put line|
|00000570| 20 69 73 20 74 68 65 6e | 20 70 72 6f 63 65 73 73 | is then| process|
|00000580| 65 64 20 63 68 61 72 61 | 63 74 65 72 20 62 79 0a |ed chara|cter by.|
|00000590| 63 68 61 72 61 63 74 65 | 72 2c 20 69 6e 63 6c 75 |characte|r, inclu|
|000005a0| 64 69 6e 67 20 74 68 65 | 20 63 61 72 72 69 61 67 |ding the| carriag|
|000005b0| 65 20 72 65 74 75 72 6e | 2c 20 62 79 20 79 6f 75 |e return|, by you|
|000005c0| 72 20 70 72 6f 67 72 61 | 6d 2e 0a 0a 49 6e 73 65 |r progra|m...Inse|
|000005d0| 72 74 20 74 68 69 73 20 | 6c 69 6e 65 20 62 65 66 |rt this |line bef|
|000005e0| 6f 72 65 20 79 6f 75 72 | 20 63 6f 75 74 3a 0a 20 |ore your| cout:. |
|000005f0| 20 63 65 72 72 20 3c 3c | 20 22 4e 6f 77 20 70 72 | cerr <<| "Now pr|
|00000600| 6f 63 65 73 73 69 6e 67 | 20 63 68 61 72 61 63 74 |ocessing| charact|
|00000610| 65 72 20 22 20 3c 3c 20 | 6c 65 74 74 65 72 20 3c |er " << |letter <|
|00000620| 3c 20 27 5c 6e 27 3b 0a | 0a 54 68 65 20 72 65 73 |< '\n';.|.The res|
|00000630| 75 6c 74 69 6e 67 20 6f | 75 74 70 75 74 20 77 69 |ulting o|utput wi|
|00000640| 6c 6c 20 74 68 65 6e 20 | 6d 61 6b 65 20 74 68 69 |ll then |make thi|
|00000650| 6e 67 73 20 6d 6f 72 65 | 20 6f 62 76 69 6f 75 73 |ngs more| obvious|
|00000660| 2e 0a 59 6f 75 20 77 69 | 6c 6c 20 61 6c 73 6f 20 |..You wi|ll also |
|00000670| 73 65 65 20 74 68 65 20 | 63 61 72 72 69 61 67 65 |see the |carriage|
|00000680| 20 72 65 74 75 72 6e 20 | 49 20 77 61 73 20 73 70 | return |I was sp|
|00000690| 65 61 6b 69 6e 67 20 6f | 66 2e 0a 0a 2d 42 72 69 |eaking o|f...-Bri|
|000006a0| 61 6e 20 3a 2d 29 0a | |an :-). | |
+--------+-------------------------+-------------------------+--------+--------+